<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery.min.js"></script>
    <script>
        $(function(){

            // 类似于innerHTML
            // console.log($("div").html());
            // $("div").html("<h3>h3</h3>");


            // 类似于innerText
            // console.log($("div").text());
            $("div").text("<h3>h3</h3>");

            // 区别：类似于innerHTML和innerText的区别

            //DOM对象.value  获取value值
            console.log(document.querySelector("input").value);

            // jquery对象.val() 获取value值
            console.log($("input").val());
        });
    </script>
</head>
<body>
    <div>
        <h3>h3</h3>
    </div>
    <input type="text" value="haha">
</body>
</html>